<template>
  <div class="footer">
    <div class="content">
      <div class="header">
        <div class="header-left">
          <div class="logo">
            <img src="@/assets/sdse_logo.png" alt="Footer-Logo">
          </div>
        </div>
        <div class="header-right">
          <p class="slogan_cn">心有猛虎，细嗅蔷薇</p>
          <p class="slogan_en">In me the tiger sniffs the rose</p>
        </div>
      </div>
      <div class="bottom">
        <div>
          <p class="copyright-text"> 山软智读 | © 2025 山软智读(SDSE AIR / SDSE AI Reading) ShandongUniversity Jinan China. All Rights Reserved | 隐私政策</p>
        </div>
        <div class="links-box">
          <div>
            <p class="contact-us">联系我们</p>
          </div>
          <div class="img-wrapper-wx">
            <div class="qr-code-wrapper">
              <div class="qr-code-wrapper-content">
                <div class="qr-code">
                  <img src="@/assets/qr-code/wx-qr-code.png" style="width: 100px; height: auto">
                </div>
              </div>
            </div>
          </div>
          <div class="img-wrapper-qq">
            <div class="qr-code-wrapper">
              <div class="qr-code-wrapper-content">
                <div class="qr-code">
                  <img src="@/assets/qr-code/qq-qr-code.png" style="width: 100px; height: auto">
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "FooterSection",
};
</script>

<style scoped>
.footer {
  width: 100%;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f7f9fd;
}

.content {
  width: 80%;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #f7f9fd;
  color: black;
}

.header {
  width: 100%;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 0 6rem 0;
  border-bottom: 1px solid rgba(128, 128, 128, 0.5);
}

.header-left {
  width: 30%;
  height: auto;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.header-right {
  width: 50%;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo img {
  width: 120px;
  height: auto;
}

.slogan_cn {
  font-family: 'Microsoft YaHei', sans-serif;
  font-weight: 600;
  font-size: 36px;
  color: black;
  position: relative;
  margin: 1rem 0 0.5rem 1rem;
}

.slogan_en {
  font-family: 'Microsoft YaHei', sans-serif;
  font-weight: 400;
  font-size: 18px;
  color: rgba(0, 0, 0, 0.75);
  position: relative;
  margin: 0.5rem 0 1rem 1rem;
}

.img-wrapper-wx {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background-image: url('@/assets/icon/wx.png');
  background-size: cover;        /* 保持背景图覆盖整个容器 */
  background-position: center;   /* 居中显示 */
  background-repeat: no-repeat;  /* 不重复 */
  position: relative;
  margin-left: 20px;
}

.img-wrapper-qq {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background-image: url('@/assets/icon/qq.png');
  background-size: cover;        /* 保持背景图覆盖整个容器 */
  background-position: center;   /* 居中显示 */
  background-repeat: no-repeat;  /* 不重复 */
  position: relative;
  margin-left: 20px;
}

.qr-code-wrapper {
  position: absolute;
  bottom: 100%;      /* 放在图标上方 */
  left: -125%;       /* 相对父容器中心定位 */
  display: none;     /* 默认隐藏 */
  background-color: white;
  padding: 10px;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
  z-index: 10;
}

.img-wrapper-wx:hover .qr-code-wrapper,
.img-wrapper-qq:hover .qr-code-wrapper {
  display: block;    /* 悬停时显示二维码弹窗 */
}

.qr-code-wrapper {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.2s ease;
  pointer-events: none;
}

.img-wrapper-wx:hover .qr-code-wrapper,
.img-wrapper-qq:hover .qr-code-wrapper {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.links-box {
   display: flex;
   justify-content: center;
   align-items: center;
 }

.bottom {
  width: 100%;
  margin: 1rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.copyright-text {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.5);
}

.contact-us {
  font-size: 13px;
}
</style>